import Vue from 'vue'
import VueRouter from 'vue-router'

Vue.use(VueRouter)

import Layout from '../layout'

// const Foo = { template: '<div>Foo</div>' }
// const Bar = { template: '<div>Bar</div>' }

const routes = [
    {
        path: '/',
        component: () => import('../views/login/index')
    },
    {
        path: '/dashboard',
        component: Layout,
        children: [{
            path: 'profile',
            component: () => import('../views/profile')
        },
        {
            path: 'tabledemo',
            component: () => import('../views/table-demo')
        }]
    }
]

const router = new VueRouter({
    routes
})

export default router